﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace EC2011_hk1_BT6_1041326_1041337_1041373_1041448.DTO
{
    public class EmployeeDTO
    {
        #region Attributes and Properties
        private int _employeeID;
        private String _lastName;
        private String _firstName;
        private DepartmentDTO _department;
        private Decimal _salary;
        private DateTime _hireDate;
        private String _urlPersonalPhoto;
        private String _description;

        public int EmployeeID
        {
            get { return _employeeID; }
            set { _employeeID = value; }
        }

        public string LastName
        {
            get { return _lastName; }
            set { _lastName = value; }
        }

        public string FirstName
        {
            get { return _firstName; }
            set { _firstName = value; }
        }

        public DepartmentDTO Department
        {
            get { return _department; }
            set { _department = value; }
        }

        public Decimal Salary
        {
            get { return _salary; }
            set { _salary = value; }
        }

        public DateTime HireDate
        {
            get { return _hireDate; }
            set { _hireDate = value; }
        }

        public string UrlPersonalPhoto
        {
            get { return _urlPersonalPhoto; }
            set { _urlPersonalPhoto = value; }
        }

        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }
        #endregion

        #region Constructors
        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Object"/> class.
        /// </summary>
        public EmployeeDTO()
        {
            _employeeID = -1;
            _lastName = null;
            _firstName = null;
            _department = new DepartmentDTO();
            _salary = -1;
            _hireDate = new DateTime();
            _urlPersonalPhoto = null;
            _description = null;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Object"/> class.
        /// </summary>
        public EmployeeDTO(int employeeID, string lastName, string firstName, DepartmentDTO department, Decimal salary, DateTime hireDate, string urlPersonalPhoto, string description)
        {
            _employeeID = employeeID;
            _lastName = lastName;
            _firstName = firstName;
            _department = department;
            _salary = salary;
            _hireDate = hireDate;
            _urlPersonalPhoto = urlPersonalPhoto;
            _description = description;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Object"/> class.
        /// </summary>
        public EmployeeDTO(EmployeeDTO emp)
        {
            _employeeID = emp.EmployeeID;
            _lastName = emp.LastName;
            _firstName = emp.FirstName;
            _department = emp.Department;
            _salary = emp.Salary;
            _hireDate = emp.HireDate;
            _urlPersonalPhoto = emp.UrlPersonalPhoto;
            _description = emp.Description;
        }
        #endregion
    }
}
